package com.yw.wanandroid.net

import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

object NetClient {
    lateinit var client: Retrofit
    fun createClient() {
        client = Retrofit.Builder().addConverterFactory(GsonConverterFactory.create())
            .baseUrl("https://www.wanandroid.com/").build()
    }

    fun getHomeApi(): HomeApi {
        return client.create(HomeApi::class.java)
    }
}